#! /bin/sh

source /root/worker/worker_functions.sh

# [in]
# $ID:		task id
# $TASK:	task content
# [out]
# $RESULT:	set by your work function
function work()
{
	# Simulate spend time
	SPEND_TIME=$(($RANDOM % 2))
	sleep $SPEND_TIME

	RESULT="`dirname $0`:"$TASK
}

# Set your own work function
WORK_FUNC=work

mainloop
